#include "mechanicalspectrumprivatedefine.h"

namespace DataSpecificationGW
{
    MechanicalExtInformationPrivate::MechanicalExtInformationPrivate()
    {
        ucAmpUnit = 6;
        bSkipAmpUnit = false;
        bHasAmpUnit = false;

        fAmpLowerLimit = 0;
        bSkipAmpLowerLimit = false;
        bHasAmpLowerLimit = false;

        fAmpUpperLimit = 0;
        bSkipAmpUpperLimit = false;
        bHasAmpUpperLimit = false;

        iDataPoint = 0;
        bSkipDataPoint = false;
        bHasDataPoint = false;

        llSampleRate = 0;
        bSkipSampleRate = false;
        bHasSampleRate = false;

        ucSwitchingOperation = 255;
        bSkipSwitchingOperation = false;
        bHasSwitchingOperation = false;

        iPowerFreqCycleCount = 0;
        bSkipPowerFreqCycleCount = false;
        bHasPowerFreqCycleCount = false;
    }

    MechanicalExtInformationPrivate& MechanicalExtInformationPrivate::operator=(const MechanicalExtInformationPrivate& stMechanicalExtInformationPrivate)
    {
        this->ucAmpUnit = stMechanicalExtInformationPrivate.ucAmpUnit;
        this->fAmpLowerLimit = stMechanicalExtInformationPrivate.fAmpLowerLimit;
        this->fAmpUpperLimit = stMechanicalExtInformationPrivate.fAmpUpperLimit;
        this->iDataPoint = stMechanicalExtInformationPrivate.iDataPoint;
        this->llSampleRate = stMechanicalExtInformationPrivate.llSampleRate;
        this->ucSwitchingOperation = stMechanicalExtInformationPrivate.ucSwitchingOperation;
        this->iPowerFreqCycleCount = stMechanicalExtInformationPrivate.iPowerFreqCycleCount;
        return *this;
    }

    bool MechanicalExtInformationPrivate::operator==(const MechanicalExtInformationPrivate& stMechanicalExtInformationPrivate) const
    {
        if (!(this->ucAmpUnit == stMechanicalExtInformationPrivate.ucAmpUnit)) return false;
        if (!qFuzzyCompare(this->fAmpLowerLimit, stMechanicalExtInformationPrivate.fAmpLowerLimit)) return false;
        if (!qFuzzyCompare(this->fAmpUpperLimit, stMechanicalExtInformationPrivate.fAmpUpperLimit)) return false;
        if (!(this->iDataPoint == stMechanicalExtInformationPrivate.iDataPoint)) return false;
        if (!(this->llSampleRate == stMechanicalExtInformationPrivate.llSampleRate)) return false;
        if (!(this->ucSwitchingOperation == stMechanicalExtInformationPrivate.ucSwitchingOperation)) return false;
        if (!(this->iPowerFreqCycleCount == stMechanicalExtInformationPrivate.iPowerFreqCycleCount)) return false;
        return true;
    }



    MechanicalCoilExtInformationPrivate::MechanicalCoilExtInformationPrivate()
    {
        ucMechDataType = 0;
        bSkipMechDataType = false;
        bHasMechDataType = false;

        ucOperatingMechanismType = 0;
        bSkipOperatingMechanismType = false;
        bHasOperatingMechanismType = false;

        ucMechStoredEnergyType = 0;
        bSkipMechStoredEnergyType = false;
        bHasMechStoredEnergyType = false;

        fCoilUpTime = 0;
        bSkipCoilUpTime = false;
        bHasCoilUpTime = false;

        fHitTime = 0;
        bSkipHitTime = false;
        bHaHitTime = false;

        fAuxSubSwitchCloseTime = 0;
        bSkipAuxSubSwitchCloseTime = false;
        bHasAuxSubSwitchCloseTime = false;

        fCoilDownTime = 0;
        bSkipCoilDownTime = false;
        bHasCoilDownTime = false;

        fCoilMaxCurrent = 0;
        bSkipCoilMaxCurrent = false;
        bHasCoilMaxCurrent = false;

        fConversionFactor = 0;
        bSkipConversionFactor = false;
        bHasConversionFactor = false;
    }

    MechanicalCoilExtInformationPrivate& MechanicalCoilExtInformationPrivate::operator=(const MechanicalCoilExtInformationPrivate& stMechanicalCoilExtInformationPrivate)
    {
        this->ucMechDataType = stMechanicalCoilExtInformationPrivate.ucMechDataType;
        this->ucOperatingMechanismType = stMechanicalCoilExtInformationPrivate.ucOperatingMechanismType;
        this->ucMechStoredEnergyType = stMechanicalCoilExtInformationPrivate.ucMechStoredEnergyType;
        this->fCoilUpTime = stMechanicalCoilExtInformationPrivate.fCoilUpTime;
        this->fHitTime = stMechanicalCoilExtInformationPrivate.fHitTime;
        this->fAuxSubSwitchCloseTime = stMechanicalCoilExtInformationPrivate.fAuxSubSwitchCloseTime;
        this->fCoilDownTime = stMechanicalCoilExtInformationPrivate.fCoilDownTime;
        this->fCoilMaxCurrent = stMechanicalCoilExtInformationPrivate.fCoilMaxCurrent;
        this->fConversionFactor = stMechanicalCoilExtInformationPrivate.fConversionFactor;
        return *this;
    }

    bool MechanicalCoilExtInformationPrivate::operator==(const MechanicalCoilExtInformationPrivate& stMechanicalCoilExtInformationPrivate) const
    {
        if (!(this->ucMechDataType == stMechanicalCoilExtInformationPrivate.ucMechDataType)) return false;
        if (!(this->ucOperatingMechanismType == stMechanicalCoilExtInformationPrivate.ucOperatingMechanismType)) return false;
        if (!(this->ucMechStoredEnergyType == stMechanicalCoilExtInformationPrivate.ucMechStoredEnergyType)) return false;
        if (!qFuzzyCompare(this->fCoilUpTime, stMechanicalCoilExtInformationPrivate.fCoilUpTime)) return false;
        if (!qFuzzyCompare(this->fHitTime, stMechanicalCoilExtInformationPrivate.fHitTime)) return false;
        if (!qFuzzyCompare(this->fAuxSubSwitchCloseTime, stMechanicalCoilExtInformationPrivate.fAuxSubSwitchCloseTime)) return false;
        if (!qFuzzyCompare(this->fCoilDownTime, stMechanicalCoilExtInformationPrivate.fCoilDownTime)) return false;
        if (!qFuzzyCompare(this->fCoilMaxCurrent, stMechanicalCoilExtInformationPrivate.fCoilMaxCurrent)) return false;
        if (!qFuzzyCompare(this->fConversionFactor, stMechanicalCoilExtInformationPrivate.fConversionFactor)) return false;
        return true;
    }




    MechanicalMotorExtInformationPrivate::MechanicalMotorExtInformationPrivate()
    {
        ucMechDataType = 0;
        bSkipMechDataType = false;
        bHasmechDataType = false;

        ucOperatingMechanismType = 0;
        bSkipOperatingMechanismType = false;
        bHasOperatingMechanismType = false;

        ucMechStoredEnergyType = 0;
        bSkipMechStoredEnergyType = false;
        bHasMechStoredEnergyType = false;

        fMotorStartCurrent = 0;
        bSkipMotorStartCurrent = false;
        bHasMotorStartCurrent = false;

        fMotorMaxCurrent = 0;
        bSkipMotorMaxCurrent = false;
        bHasMotorMaxCurrent = false;

        fMotorStorageTime = 0;
        bSkipMotorStorageTime = false;
        bHasMotorStorageTime = false;

        fConversionFactor = 0;
        bSkipConversionFactor = false;
        bHasConversionFactor = false;
    }

    MechanicalMotorExtInformationPrivate& MechanicalMotorExtInformationPrivate::operator=(const MechanicalMotorExtInformationPrivate& stMechanicalMotorExtInformationPrivate)
    {
        this->ucMechDataType = stMechanicalMotorExtInformationPrivate.ucMechDataType;
        this->ucOperatingMechanismType = stMechanicalMotorExtInformationPrivate.ucOperatingMechanismType;
        this->ucMechStoredEnergyType = stMechanicalMotorExtInformationPrivate.ucMechStoredEnergyType;
        this->fMotorStartCurrent = stMechanicalMotorExtInformationPrivate.fMotorStartCurrent;
        this->fMotorMaxCurrent = stMechanicalMotorExtInformationPrivate.fMotorMaxCurrent;
        this->fMotorStorageTime = stMechanicalMotorExtInformationPrivate.fMotorStorageTime;
        this->fConversionFactor = stMechanicalMotorExtInformationPrivate.fConversionFactor;
        return *this;
    }

    bool MechanicalMotorExtInformationPrivate::operator==(const MechanicalMotorExtInformationPrivate& stMechanicalMotorExtInformationPrivate) const
    {
        if (!(this->ucMechDataType == stMechanicalMotorExtInformationPrivate.ucMechDataType)) return false;
        if (!(this->ucOperatingMechanismType == stMechanicalMotorExtInformationPrivate.ucOperatingMechanismType)) return false;
        if (!(this->ucMechStoredEnergyType == stMechanicalMotorExtInformationPrivate.ucMechStoredEnergyType)) return false;
        if (!qFuzzyCompare(this->fMotorStartCurrent, stMechanicalMotorExtInformationPrivate.fMotorStartCurrent)) return false;
        if (!qFuzzyCompare(this->fMotorMaxCurrent, stMechanicalMotorExtInformationPrivate.fMotorMaxCurrent)) return false;
        if (!qFuzzyCompare(this->fMotorStorageTime, stMechanicalMotorExtInformationPrivate.fMotorStorageTime)) return false;
        if (!qFuzzyCompare(this->fConversionFactor, stMechanicalMotorExtInformationPrivate.fConversionFactor)) return false;
        return true;
    }





    MechanicalSwitchExtInformationPrivate::MechanicalSwitchExtInformationPrivate()
    {
        ucMechDataType = 0;
        bSkipMechDataType = false;
        bHasmechDataType = false;

        ucOperatingMechanismType = 0;
        bSkipOperatingMechanismType = false;
        bHasOperatingMechanismType = false;

        ucMechStoredEnergyType = 0;
        bSkipMechStoredEnergyType = false;
        bHasMechStoredEnergyType = false;

        fSwitchOpenTime = 0;
        bSkipswitchOpenTime = false;
        bHasswitchOpenTime = false;

        fSwitchCloseTime = 0;
        bSkipswitchCloseTime = false;
        bHasswitchCloseTime = false;

        fSwitchTwiceTime = 0;
        bSkipswitchTwiceTime = false;
        bHasswitchTwiceTime = false;

        fSwitchOpenSync = 0;
        bSkipswitchOpenSync = false;
        bHasswitchOpenSync = false;

        fSwitchCloseSync = 0;
        bSkipswitchCloseSync = false;
        bHasswitchCloseSync = false;

        fSwitchTwiceSync = 0;
        bSkipswitchTwiceSync = false;
        bHasswitchTwiceSync = false;

        fSwitchShotTime = 0;
        bSkipswitchShotTime = false;
        bHasswitchShotTime = false;

        fSwitchNoCurrentTime = 0;
        bSkipswitchNoCurrentTime = false;
        bHasswitchNoCurrentTime = false;

        fConversionFactor = 0;
        bSkipConversionFactor = false;
        bHasConversionFactor = false;
    }

    MechanicalSwitchExtInformationPrivate& MechanicalSwitchExtInformationPrivate::operator=(const MechanicalSwitchExtInformationPrivate& stMechanicalSwitchExtInformationPrivate)
    {
        this->ucMechDataType = stMechanicalSwitchExtInformationPrivate.ucMechDataType;
        this->ucOperatingMechanismType = stMechanicalSwitchExtInformationPrivate.ucOperatingMechanismType;
        this->ucMechStoredEnergyType = stMechanicalSwitchExtInformationPrivate.ucMechStoredEnergyType;
        this->fSwitchOpenTime = stMechanicalSwitchExtInformationPrivate.fSwitchOpenTime;
        this->fSwitchCloseTime = stMechanicalSwitchExtInformationPrivate.fSwitchCloseTime;
        this->fSwitchTwiceTime = stMechanicalSwitchExtInformationPrivate.fSwitchTwiceTime;
        this->fSwitchOpenSync = stMechanicalSwitchExtInformationPrivate.fSwitchOpenSync;
        this->fSwitchCloseSync = stMechanicalSwitchExtInformationPrivate.fSwitchCloseSync;
        this->fSwitchTwiceSync = stMechanicalSwitchExtInformationPrivate.fSwitchTwiceSync;
        this->fSwitchShotTime = stMechanicalSwitchExtInformationPrivate.fSwitchShotTime;
        this->fSwitchNoCurrentTime = stMechanicalSwitchExtInformationPrivate.fSwitchNoCurrentTime;
        this->fConversionFactor = stMechanicalSwitchExtInformationPrivate.fConversionFactor;
        return *this;
    }

    bool MechanicalSwitchExtInformationPrivate::operator==(const MechanicalSwitchExtInformationPrivate& stMechanicalSwitchExtInformationPrivate) const
    {
        if (!(this->ucMechDataType == stMechanicalSwitchExtInformationPrivate.ucMechDataType)) return false;
        if (!(this->ucOperatingMechanismType == stMechanicalSwitchExtInformationPrivate.ucOperatingMechanismType)) return false;
        if (!(this->ucMechStoredEnergyType == stMechanicalSwitchExtInformationPrivate.ucMechStoredEnergyType)) return false;
        if (!qFuzzyCompare(this->fSwitchOpenTime, stMechanicalSwitchExtInformationPrivate.fSwitchOpenTime)) return false;
        if (!qFuzzyCompare(this->fSwitchCloseTime, stMechanicalSwitchExtInformationPrivate.fSwitchCloseTime)) return false;
        if (!qFuzzyCompare(this->fSwitchTwiceTime, stMechanicalSwitchExtInformationPrivate.fSwitchTwiceTime)) return false;
        if (!qFuzzyCompare(this->fSwitchOpenSync, stMechanicalSwitchExtInformationPrivate.fSwitchOpenSync)) return false;
        if (!qFuzzyCompare(this->fSwitchCloseSync, stMechanicalSwitchExtInformationPrivate.fSwitchCloseSync)) return false;
        if (!qFuzzyCompare(this->fSwitchTwiceSync, stMechanicalSwitchExtInformationPrivate.fSwitchTwiceSync)) return false;
        if (!qFuzzyCompare(this->fSwitchShotTime, stMechanicalSwitchExtInformationPrivate.fSwitchShotTime)) return false;
        if (!qFuzzyCompare(this->fSwitchNoCurrentTime, stMechanicalSwitchExtInformationPrivate.fSwitchNoCurrentTime)) return false;
        if (!qFuzzyCompare(this->fConversionFactor, stMechanicalSwitchExtInformationPrivate.fConversionFactor)) return false;
        return true;
    }


    MechanicalDataPrivate::MechanicalDataPrivate()
    {
        bSkipMechStorageData = false;
        bHasMechStorageData = false;
    }

    MechanicalDataPrivate& MechanicalDataPrivate::operator=(const MechanicalDataPrivate& stMechanicalDataPrivate)
    {
        this->qbaMechStorageData = stMechanicalDataPrivate.qbaMechStorageData;
        return *this;
    }

    bool MechanicalDataPrivate::operator==(const MechanicalDataPrivate& stMechanicalDataPrivate) const
    {
        if (!(this->qbaMechStorageData == stMechanicalDataPrivate.qbaMechStorageData)) return false;
        return true;
    }
}
